import { default as request, cloud } from '@/framework/utils/request'

// 获取数据列表
export function getOrder(query) {
  return request({
    url: `${cloud.mall}/tModOrder/getOrderSure`,
    method: 'get',
    params: query
  })
}
// 获取地址列表接口
export function getAddress(query) {
  return request({
    url: `${cloud.mall}/tMmsetReceivingAddress/pageList`,
    method: 'get',
    params: query
  })
}
//
export function getInsert(data) {
  return request({
    url: `${cloud.mall}/tModOrder/insert`,
    method: 'post',
    data
  })
}

/**
 * @description: 订单优惠计算 /tModOrder/discountCalculation
 * @data
 */
export function CouponCalculation(data) {
  return request({
    url: `${cloud.mall}/tModOrder/discountCalculation`,
    method: "post",
    data,
  });
}
